package com.mew.slots.core.common.messge.response;

import com.mew.common.entity.game.Jackport;
import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.*;

import java.util.List;

/**
 * @author dylin
 * @create 2020/12/30 0030
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class PushJackPortMessage extends ZebraBaseMessage<PushJackPortMessage> {
    private List<Jackport> jackPorts;
    @Override
    public void write(ByteBuf b) {

        writeInt(b,jackPorts.size());
        for (Jackport jackPort : jackPorts) {
            writeInt(b,jackPort.getNo());
            writeLong(b,jackPort.getVal());
        }
    }

    @Override
    public PushJackPortMessage read(ByteBuf byteBuf) {
        return null;
    }
}
